﻿@{
    Layout = null;
}
@*@model System.Data.DataTable*@
@model System.Collections.IEnumerable
<!DOCTYPE html>
<html>
<head>
    <title>期号查询</title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.DropDownEdit, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.ComboBox, Theme = DevExpressHelper.Theme }
)
   <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/checkinput.js")" type="text/javascript"></script>
    <style type="text/css">
        #form_query
        {
        }
        .hide
        {
            display:none;
            }
        input, select
        {
            border: 1px solid #aecaf0;
        }
        input.txt, select.txt
        {
            width: 99%;
        }
        input.btn
        {
            padding: 3px 10px 2px;
            border: #a3c0e8 1px solid;
            background: #e2f0ff url(/EnterpriseFund/DXR.axd?r=0_54) repeat-x 50% top;
            color: #2c4d79;
            cursor: pointer;
        }
        input.btn:hover
        {
            background-image: url(/EnterpriseFund/DXR.axd?r=0_57);
        }
        th
        {
            text-align: right;
        }
    </style>
    <script type="text/javascript">
        var rootUrl = '@Url.Content("~/QueryFIssueNo/")';

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;


            var nsrsbh1 = $("#hnsrsbh").val();
            var nsrbm1 = $("#hnsrbm").val();
            var nsrmc1 = $("#hnsrmc").val();
            var fIssueNo1 = $("#hfIssueNo").val();



            e.customArgs["Nsrsbh"] = nsrsbh1;
            e.customArgs["Nsrbm"] = nsrbm1;
            e.customArgs["Nsrmc"] = nsrmc1;
            e.customArgs["FIssueNo"] = fIssueNo1;

        }

        //查询
        function search() {
            //              var fspecialAdjustName = FSpecialAdjustName.GetValue();
            //               var rKRQBeginDate = RKRQBeginDate.GetValue();
            //                var rKRQEndDate = RKRQEndDate.GetValue();
            // if (CheckValues())
            $("#hnsrsbh").val(Nsrsbh.GetText());
            $("#hnsrbm").val(Nsrbm.GetText());
            $("#hnsrmc").val(Nsrmc.GetText());
            $("#hfIssueNo").val(FIssueNo.GetText());
            $("#hsearched").val("T");
            gvEditing.Refresh();

        }


        //重置
        function undo() {

            $("#hnsrsbh").val("");
            $("#hnsrbm").val("");
            $("#hnsrmc").val("");
            $("#hfIssueNo").val("");
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnExcel":
                    {
                        if ($("#hsearched").val() == "T") {
                            //if (CheckValues())
                            form_query.target = '_self';
                            form_query.action = rootPath + "/QueryFIssueNo/ExportToXls";
                            form_query.submit();
                        }
                        break;


                    }
                case "btnReport":
                    {
                        if ($("#hsearched").val() == "T") {
                            window.showModalDialog(rootPath + "/QueryFIssueNo/Print", window, "dialogWidth=800px;dialogHeight=500px");
                        }


                        //                        //if (CheckValues())
                        //                        form_query.target = '_blank';
                        //                        //  form_query.target = 'parent.contentframe';
                        //                        //  parent.contentframe.url(
                        //                        form_query.action = rootPath + "/QueryFIssueNo/Print";
                        //                        form_query.submit();
                        break;


                    }
                case "btnGridShow":
                    {
                        gvEditing.ShowCustomizationWindow();
                        break;
                    }
                    
            }
        }
        function keyPress() {
            if (event.keyCode && event.keyCode == 13) {
                search();

            }

        }
    </script>
</head>
<body  onkeypress="keyPress()">
    @Html.Partial("LoadPanelPartial")
    @Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnExcel";
        item.Text = "导出Excel";
        item.Image.Url = Url.Content("~/Content/ControlImages/excel.png");
    });
    settings.Items.Add(item =>
    {
        item.Name = "btnReport";
        item.Text = "打印";
        item.Image.Url = Url.Content("~/Content/icons/print.png");
    });
    
    settings.Items.Add(item =>
        {
            item.Name = "btnGridShow";
            item.Text = "选择列";
            item.Image.Url = Url.Content("~/Content/FunctionImages/AllowanceFileAudit.png");
        });
    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()
    @using (Html.BeginForm("ExportToXls", "QueryFIssueNo", FormMethod.Post, new { id = "form_query" }))
    {
        <table class="query"  width="800px" style="margin-left: auto; margin-right: auto">
            <tr>
                <td align="right" style="text-align:right">
                    纳税人识别号：
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Nsrsbh";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(120);
               }).GetHtml()
                </td>
                <td align="right" style="text-align:right">
                    纳税人编码：
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Nsrbm";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(120);
               }).GetHtml()
                </td>
                <td align="right" style="text-align:right">
                    纳税人名称：
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Nsrmc";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(120);
               }).GetHtml()
                </td>
                <td align="center">
                    @Html.DevExpress().Button(settings =>
      {
          settings.Name = "btnSearch";
          settings.Text = "查询";
          settings.ControlStyle.CssClass = "button";
          settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
          settings.ClientSideEvents.Click = "search";
      }).GetHtml()
                </td>
                <td>
                    @Html.DevExpress().Button(settings =>
        {
            settings.Name = "btnUndo";
            settings.Text = "重置";
            settings.ControlStyle.CssClass = "button";
            settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
            settings.ClientSideEvents.Click = "undo";
        }).GetHtml()
                </td>
            </tr>
            <tr>     

                <td align="right" style="text-align:right">
                    期号：
                </td>
                <td>
                    @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FIssueNo";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(120);
               }).GetHtml()
                </td>
            </tr>

        </table>
                    <div class="hide">
                    @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FSpecialAdjustName";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(120);
                   settings.Properties.TextField = "FSpecialAdjustName";
                   settings.Properties.ValueField = "FSpecialAdjustClsNo";
               }).GetHtml()
               </div>
        @Html.Partial("QueryFIssueNoListPartial", Model);
         @Html.Hidden("hnsrsbh", "");
          @Html.Hidden("hnsrbm", "");
            @Html.Hidden("hnsrmc", "");
       
          @Html.Hidden("hfIssueNo", "");
                                       @Html.Hidden("hsearched", "F")
            
    }
</body>
</html>
<script>
    lp.Hide();
</script>
